package net.jonbuck.tassoo.persistence.dao;

import net.jonbuck.tassoo.model.AttachmentTypes;
import net.jonbuck.tassoo.model.Categories;
import net.jonbuck.tassoo.model.Container;
import net.jonbuck.tassoo.model.Containers;
import net.jonbuck.tassoo.model.Priorities;
import net.jonbuck.tassoo.model.Statuses;
import net.jonbuck.tassoo.model.Task;
import net.jonbuck.tassoo.model.Tassoo;
import net.jonbuck.tassoo.model.Types;

import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;

/**
 * 
 * 
 * @since 1.0.0
 */
public interface TassooDao {

	/**
	 * 
	 */
	void addModelListener(Adapter adapter);

	/**
	 * 
	 */
	void bootstrap();

	/**
	 * 
	 * @return
	 */
	boolean closeTaskStore(boolean saveTaskStore);

	/**
	 * 
	 * @param task
	 * @param text
	 */
	void createComment(Task task, String text);

	/**
	 * 
	 * @param container
	 */
	void createNewContainer(Container container);

	/**
	 * 
	 * @param newTask
	 * @param parentContainer
	 */
	void createNewTask(Task newTask, Container parentContainer);

	/**
	 * 
	 * @param newTask
	 * @param taskByValue
	 */
	void createNewTask(Task newTask, Task parentTask);

	/**
	 * 
	 * @return
	 */
	boolean createNewTaskStore(Tassoo tassoo);

	/**
	 * 
	 * @return
	 */
	AttachmentTypes getAttachmentTypes();
	
	/**
	 * 
	 * @return
	 */
	Categories getCategories();

	/**
	 * 
	 * @return
	 */
	Containers getContainers();

	/**
	 * 
	 * @return
	 */
	AdapterFactoryEditingDomain getEditingDomain();

	/**
	 * 
	 * @return
	 */
	Priorities getPriorities();

	/**
	 * 
	 * @return
	 */
	Statuses getStatuses();

	/**
	 * 
	 * @return
	 */
	String getSystemDir();

	/**
	 * 
	 * @return
	 */
	Tassoo getTassoo();

	/**
	 * 
	 * @return
	 */
	Types getTypes();

	/**
	 * <p>
	 * <b>Determines if the Data has been loaded and is ready for accessing.</b>
	 * </p>
	 * 
	 * @return <em>true</em> if the data has been loaded and ready for accessing
	 *         otherwise <em>false</em>
	 */
	boolean isLoaded();

	/**
	 * 
	 * @param filePath
	 * @return
	 */
	boolean loadTaskStore(String filePath);

	/**
	 * 
	 */
	void removeModelListener(Adapter adapter);
	
	/**
	 * 
	 * @return
	 */
	boolean saveTaskStore();

	/**
	 * 
	 */
	void shutdown();

}
